import { getHomeArticleApi } from "../../utils/api";
const articleModules = {
  state: {
    article: [],
  },
  mutations: {
    getArticle(state, payload) {
      state.article = payload;
    },
  },
  actions: {
    async getArticleData({ commit }) {
      const res = await getHomeArticleApi();
      commit("getArticle", res);
    },
  },
};

export default articleModules;
